var id = getCookie("openid");
$.ajax({
	type : 'POST',
	url : '/log.do',
	data:{"e.title":document.title,"e.openid":getCookie("openid"),"e.url":window.location.href,"e.parid":_parid},
	dataType : "JSON",
	success : function(data) {
	}
});
$("<scri" + "pt>" + "</scr" + "ipt>").attr({ src: '/js/scrolltopcontrol.js', type: 'text/javascript', id: 'load3' }).appendTo($('head'));



var menuhead='<div class="navbar-fixed-top fixed-back" ><div class="row"><div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 di" onclick="javascript:window.history.back()"><a href="javascript:window.history.back()" class="di-text"><img src="/images/back.png" width="25"></a></div><div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 di"><a   class="di-text">'+document.title+'</a></div><div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 di cd"><a class="btn btn-info" href="#" class="di-text">菜单</a></div></div></div>';
$('body').append(menuhead);
$.ajax({
	type : 'GET',
	url : 'ums!nav.do?id='+_parid,
	//data:{"e.title":document.title,"e.openid":getCookie("openid"),"e.url":window.location.href,"e.parid":_parid},
	dataType : "JSON",
	success : function(data) {
		var h ="";
		//style="margin-top:15px;"
		$(data).each(function(index) {
			   var val = data[index];
			h=h+'<li onclick="tzpage(\''+val.url+'\')"><a href="'+val.url+'">'+val.title+'</a></li>';
		})
	    h=h+"<li  ><a href='/wxindex!index.do?id=1'>微官网</a></li>";
		var menuhtml ='<div class="gray"></div><div class="xlcd" > <ul>'+h+'</ul><div class="btn-group btn-group-justified" role="group"><div class="btn-group" role="group"><button type="button" onclick="sx();" class="btn btn-default reload">刷新</button></div><div class="btn-group" role="group"><button type="button" class="btn btn-default closes" onclick="javascript:closemenu();">关闭</button></div></div></div>';
$('body').append(menuhtml);
	}
});

$(".cd,.closes").click(function(){
	//$(".gray").show();
	$(".xlcd").toggle("slow").show();
	$(".gray").toggle();
	});
$(".closes").click(function(){
	$(".gray").hide();
	});
function tzpage(o){
window.location.href=o;
}
function closemenu(){
	$(".xlcd").toggle("slow").show();
	$(".gray").hide();
}
function sx(){
	localStorage.setItem("page",0);	
	localStorage.setItem("datas","");
	window.location.reload();
}
